import java.io.*;
import java.util.*;
public class test {
    // 牛客 经此一役小红所向无敌
    public static PrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
    public static Read in = new Read();
    public static void main(String[] args) throws IOException{
        long a = in.nextLong();
        long h = in.nextLong();
        long b = in.nextLong();
        long k = in.nextLong();
        long sum = 0;
        while(h > 0 && k > 0){
            sum += a + b;
            h -= b;
            k -= a;
        }
        if(h > 0){
            sum += 10 * a;
        }else if(k > 0){
            sum += 10 * b;
        }
        System.out.println(sum);
    }
    // 牛客 爱丽丝的人偶
    public static void main1(String[] args) throws IOException{
        int n = in.nextInt();
        int l = 1;
        int r = n;
        int[] arr = new int[n];
        for(int i = 0;i < n && i + 1 < n;i += 2){
            arr[i] = l++;
            arr[i + 1] = r--;
        }
        if(n % 2 != 0){
            arr[n - 1] = n / 2 + 1;
        }
        for(int i = 0;i < n;i++){
            System.out.print(arr[i] + " ");
        }
    }
    // 牛客 最长回文子序列
    public static void main2(String[] args) throws IOException{
        String s = in.next();
        int n = s.length();
        char[] str = s.toCharArray();
        int[][] dp = new int[n][n];
        for(int i = 0;i < n;i++){
            Arrays.fill(dp[i],1);
        }
        int len = 1;
        int max = 0;
        while(len <= n) {
            for (int i = 0; i < n && i + len - 1 < n; i++) {
                int j = i + len - 1;
                if (len == 1) {
                    dp[i][j] = 1;
                } else if (len == 2) {
                    dp[i][j] = str[i] == str[j] ? 2 : 1;
                } else {
                    dp[i][j] = Math.max(dp[i + 1][j], dp[i][j - 1]);
                    dp[i][j] = Math.max(dp[i][j], dp[i + 1][j - 1] + (str[i] == str[j] ? 2 : 0));
                }
                max = Math.max(dp[i][j],max);
            }
            len++;
        }
        System.out.println(max);
    }
}
class Read{
    StringTokenizer st = new StringTokenizer("");
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String next() throws IOException{
        while(!st.hasMoreTokens()){
            st = new StringTokenizer(br.readLine());
        }
        return st.nextToken();
    }
    int nextInt() throws IOException{
        return Integer.parseInt(next());
    }
    long nextLong() throws IOException{
        return Long.parseLong(next());
    }
    double nextDouble() throws IOException{
        return Double.parseDouble(next());
    }
}